Skip to content

Improve error message if qt binding could not be found#205

Merged
larsoner merged 7 commits into
mne-tools:mainfrom
timonmerk:patch-2
Oct 2, 2023
Merged

Improve error message if qt binding could not be found#205
larsoner merged 7 commits into
mne-tools:mainfrom
timonmerk:patch-2

Conversation

@timonmerk
Copy link
Copy Markdown
Contributor

Related to #199, this PR checks before the first qtpy import if the QtBindingsNotFoundError exception is thrown. The error message now hints that pyqt5 needs to be installed.

Comment thread mne_qt_browser/_pg_figure.py Outdated
Comment thread mne_qt_browser/_pg_figure.py Outdated
Comment on lines +26 to +35
from qtpy.QtCore import (
QEvent,
QThread,
Qt,
Signal,
QRectF,
QLineF,
QPointF,
QPoint,
QSettings,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also just nest one of these imports, then the rest can be as they were before. It'll make the diff smaller as well

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comments @larsoner

Comment thread mne_qt_browser/_pg_figure.py Outdated
timonmerk and others added 5 commits October 2, 2023 19:59
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
Comment thread mne_qt_browser/_pg_figure.py Outdated
Copy link
Copy Markdown
Member

@larsoner larsoner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marking for merge when green, thanks in advance @timonmerk !

@larsoner larsoner enabled auto-merge (squash) October 2, 2023 18:57
@larsoner larsoner merged commit 573910d into mne-tools:main Oct 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants